﻿using Microsoft.Extensions.DependencyInjection;
using Newtonsoft.Json;

namespace WMS.FC.Infrastructure.Register
{
    public static class JsonRegister
    {
        public static void RegisterJson(this IMvcBuilder builder)
        {
            builder.AddNewtonsoftJson(option =>
            {
                option.SerializerSettings.NullValueHandling = NullValueHandling.Ignore;
                option.SerializerSettings.DateFormatString = "yyyy-MM-dd HH:mm:ss";
            });
        }
    }
}
